#include<iostream>
#include<list>

using namespace std;


void test1()
{

    list<int> ls1;
    ls1.push_back(1);
    ls1.push_back(3);
    ls1.push_back(5);
    ls1.push_back(7);
    
    for(auto& e : ls1)
    {
        cout << e << " ";
    }
    cout << endl;

    ls1.push_front(100);

    for(auto& e : ls1)
    {
        cout << e << " ";
    }
    cout << endl;

    ls1.reverse();


    for(auto& e : ls1)
    {
        cout << e << " ";
    }
    cout << endl;
    
    ls1.sort();


    for(auto& e : ls1)
    {
        cout << e << " ";
    }
    cout << endl;
}

void test2()
{
    list<int> lt1,lt2;
    for(int i = 1; i <= 3; ++i)
    {
        lt1.push_back(i);
    }

    for(int i = 1; i <= 3; ++i)
    {
        lt2.push_back(i*10);
    }

    for(auto& e : lt1)
    {
        cout << e << " ";
    }
    cout << endl;

    for(auto& e : lt2)
    {
        cout << e << " ";
    }
    cout << endl;


    //lt1.splice(lt1.end(),lt2);
   
    auto it = lt2.begin();
    

    lt1.splice(lt1.begin(),lt2,it);

    for(auto& e : lt1)
    {
        cout << e << " ";
    }
    cout << endl;
}

 //int main()
//{
//    //test1(); 
//    test2();
//    return 0;
//}
//

#include"mylist.h"


int main()
{
    //xyx::test01();
    //xyx::test02();
    xyx::test4();
    
    return 0;
}
